﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="PaypalSuccess.aspx.cs" Inherits="University.Workshop.WebApp.PaypalSuccess" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript" src="Scripts/js/jquery-1.7.2.min.js"></script>
    <script src='Scripts/jquery.MetaData.js' type="text/javascript" language="javascript"></script>
    <script src='Scripts/jquery.rating.js' type="text/javascript" language="javascript"></script>
    <link href='Styles/jquery.rating.css' type="text/css" rel="stylesheet" />
    <link type="text/css" href="Styles/css/smoothness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
    <script type="text/javascript" src="Scripts/js/jquery-ui-1.8.20.custom.min.js"></script>

    <script>
        $(function () {
            // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
            $("#dialog:ui-dialog").dialog("destroy");

            var r = $("#rate"),
                com = $("#comment"),
                name = document.getElementById('<%=sellerMail.ClientID %>').getAttribute("value"),
                tips = $(".validateTips");
            tips
				.text("Rate " + name + ":");
            $("#dialog-confirm").dialog({
                resizable: true,
                height: 300,
                width: 400,
                modal: true,
                buttons: {
                    "accept": function () {
                        document.location("UserRateHandler.ashx?Rate=" + r.val() + "&userName=" + name + "&feedBack=" + com.val());
                    },
                    Cancel: function () {
                        $(this).dialog("close");
                    }
                }
            });
        });
    </script>
        <div id="dialog-confirm" title="Seller Feedback">
            <script>
                $(function () {
                    $('.auto-submit-star').rating({
                        callback: function (value, link) {
                            var pr = document.getElementById("rate");
                            pr.value = value;
                            var pr = document.getElementById("msg");
                            pr.innerHTML = "Leave some feedback information!";
                        }
                    });
                });
            </script>
            <p class="validateTips">Rate Him/Her: </p>
            <input class="auto-submit-star" type="radio" name="test-1-rating-4" value="10" title="Worst" />
            <input class="auto-submit-star" type="radio" name="test-1-rating-4" value="20" title="Bad" />
            <input class="auto-submit-star" type="radio" name="test-1-rating-4" value="30" title="OK" />
            <input class="auto-submit-star" type="radio" name="test-1-rating-4" value="40" title="Good" />
            <input class="auto-submit-star" type="radio" name="test-1-rating-4" value="50" title="Best" />
            <br />
            <div id="comments" runat="server">
                <textarea name="comment" id="comment" cols="20" rows="3" class="text ui-widget-content ui-corner-all"></textarea>
                <input type="text" name="rate" id="rate" style="display: none;" class="text ui-widget-content ui-corner-all" />
                <br />
                <label id="msg">Rate your seller!</label>
            </div>
            </form>
        </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <center>
        <asp:Label ID="lOrder" runat="server" Text="Hai" Font-Bold="True" Font-Size="Large"
            ForeColor="#009900"></asp:Label>
        <asp:TextBox ID="sellerMail" runat="server" Text="admin@admin.com" Style="display: none;"></asp:TextBox>
    </center>
    <br />
    <br />
    <asp:Panel ID="panel1" runat="server" BorderColor="Gray" BorderWidth="7">
    
        <center>
            <br />
            <asp:Label ID="giftCardLabel" runat="server" Font-Bold="True" 
                Font-Size="X-Large" ForeColor="#660066"></asp:Label>
            <br />
            <br />
            <br />
            <asp:Button ID="GiveButton" runat="server" Visible="false" 
                OnClick="GiveButton_Click" Height="44px" BorderWidth="4px" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="KeepButton" runat="server" Visible="false" 
                OnClick="KeepButton_Click" Height="44px" BorderWidth="4px" />
        </center>
        <br />
        <br />
    </asp:Panel>
    <div style="margin-left: 80px">
        <asp:GridView ID="GridView1" runat="server" Visible="False" AutoGenerateColumns="false">
            <Columns>
                <asp:BoundField DataField="ProductId" HeaderText="ProductId" />
            </Columns>
        </asp:GridView>
        &nbsp;<asp:GridView ID="GridView2" runat="server" Visible="False" AutoGenerateColumns="false">
            <Columns>
                <asp:BoundField DataField="ProductId" HeaderText="ProductId" />
            </Columns>
        </asp:GridView>
        <asp:GridView ID="GridView3" runat="server" Visible="False" AutoGenerateColumns="false">
            <Columns>
                <asp:BoundField DataField="Quantity" HeaderText="Quantity" />
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>
